package org.auth.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.crypto.password.StandardPasswordEncoder;

@Configuration
public class PasswordConfig {

	/**
	 * 短信验证码长度（手机侧）
	 */
	@Value("${project.security.secret}")
    private String secretKey;


	/**
	 * passwordEncoder生成
	 */
	@Bean  
    public PasswordEncoder passwordEncoder() {  
        return new StandardPasswordEncoder(secretKey);
    }
}
